package com.lzs.adx.web.modules.adx.controller;

import com.lzs.adx.commmon.utils.Result;
import com.lzs.adx.web.commmon.utils.URLParameterCleaner;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/base/common/")
@Api(tags="账户日结算表")
public class CommonController {



    @GetMapping("/getRealUrl")
    public Result getEffectiveUrl(String url) throws Exception {
        if(StringUtils.isNotBlank(url)) {
            url = StringEscapeUtils.unescapeHtml4(url);
        }
        return new Result().ok(URLParameterCleaner.cleanURL(url) );
    }

}
